package com.aqiang.user_content.contract;

import com.aqiang.core.Repository;
import com.aqiang.core.model.IModel;
import com.aqiang.core.presenter.BasePresenter;
import com.aqiang.core.view.IView;
import com.aqiang.net.entity.BaseEntity;
import com.aqiang.user_content.entity.User2Entity;
import com.aqiang.user_content.entity.UserEntity;

import io.reactivex.Observable;

public interface RegisterContract {
    interface RegisterModel extends IModel{
        Observable<UserEntity> requestRegister(UserEntity userEntity);

        Observable<BaseEntity<User2Entity>> request2Register(User2Entity user2Entityy);
    }

    interface RegisterView extends IView{
        void succse();
        String getUser();
        String getPwd();
    }

    abstract class RegisterRepository extends Repository<RegisterModel>{
        public abstract Observable<UserEntity> requestRegister(UserEntity userEntity);
        public abstract Observable<BaseEntity<User2Entity>> request2Register(User2Entity userEntity);
    }

    abstract class RegisterPresenter extends BasePresenter<RegisterRepository,RegisterView>{

        public RegisterPresenter(RegisterView registerView) {
            super(registerView);
        }

        public abstract void requestRegister();
        public abstract void request2Register();
    }
}
